library(ggplot2)
library(reshape2)
library(ggthemes)
library(RColorBrewer)

data <- data.frame(
    Name = c("Apple", "Google", "Facebook", "Amazon", "Tencent"),
    Company = c("Apple", "Google", "Facebook", "Amozon", "Tencent"),
    Sale2013 = c(5000, 3500, 2300, 2100, 3100),
    Sale2014 = c(5050, 3800, 2900, 2500, 3300),
    Sale2015 = c(5050, 4000, 3200, 2800, 3700),
    Sale2016 = c(6000, 4800, 4500, 3500, 4300))

mydata <- melt(data, id.vars = c("Name", "Company"), 
               variable.name = "Year", value.name = "Sale")

# ggplot(mydata, aes(Company, Sale, fill = Year)) + geom_line()
ggplot(mydata, aes(Company, Sale, group = Year, fill = Year)) + geom_line()

ggplot(mydata, aes(Company, Sale, group = Year, colour = Year)) + 
  geom_line() + geom_point()

ggplot(mydata, aes(Company, Sale, group = Year, colour = Year)) + 
  geom_line(linetype = 1, size = 1.5) + geom_point()

ggplot(mydata, aes(Company, Sale, group = Year, colour = Year)) + 
  geom_line(linetype = 2, size = 1.5) + geom_point()

ggplot(mydata, aes(Company, Sale, group = Year, colour = Year)) + 
  geom_line(linetype = 3, size = 1.5) + geom_point()

ggplot(mydata, aes(Company, Sale, group = Year, colour = Year)) + 
  geom_line(linetype = 4, size = 1.5) + geom_point()

ggplot(mydata, aes(Company, Sale, group = Year, colour = Year)) + 
  geom_line(linetype = 5, size = 1.5) + geom_point()

ggplot(mydata, aes(Company, Sale, group = Year, colour = Year)) + 
  geom_line(linetype = 6, size = 1.5) + geom_point()

# Smooth line
ggplot(mpg, aes(cty, hwy)) + geom_point() + geom_smooth()

ggplot(mpg, aes(cty, hwy)) + geom_point() + geom_smooth(se = FALSE)

ggplot(mpg, aes(cty, hwy)) + geom_point() + geom_smooth(method = 'lm')
